<?php
include 'header.php';
if ($_COOKIE["is_login"] == 0 || $_COOKIE["is_login"] == null) {
    echo "<script>window.location.href='login.php';</script>";
}
$id = $_COOKIE['user_id'];
$from = $db->query("SELECT * from Base_User where Account = '$id'");
$row = $from->fetch();
$SqlToPerson[0] = strval($row['EnCode']);
$SqlToPerson[1] = strval($row["Account"]);
$SqlToPerson[2] = strval($row["Password"]);
$SqlToPerson[3] = strval($row["RealName"]);
$SqlToPerson[4] = strval($row["Gender"]);
$SqlToPerson[5] = strval($row["Birthday"]);
$SqlToPerson[6] = strval($row["Mobile"]);
$SqlToPerson[7] = strval($row["Telephone"]);
$SqlToPerson[8] = strval($row["Email"]);
$SqlToPerson[9] = strval($row["OrganizeId"]);
$SqlToPerson[10] = strval($row["DepartmentId"]);
$SqlToPerson[11] = strval($row["RoleId"]);
$SqlToPerson[12] = strval($row["DutyId"]);
$SqlToPerson[13] = strval($row["PreviousVisit"]);
$SqlToPerson[14] = strval($row["LastVisit"]);
$SqlToPerson[15] = strval($row["LogOnCount"]);
$SqlToPerson[16] = strval($row["DeleteMark"]);
$SqlToPerson[17] = strval($row["EnableMark"]);
$SqlToPerson[18] = strval($row["CreatDate"]);
$SqlToPerson[19] = strval($row["CreatUserId"]);
$SqlToPerson[20] = strval($row["ModifyDate"]);
$SqlToPerson[21] = strval($row["ModifyUserId"]);
$im = new person_info\person($SqlToPerson, $db);
?>
<div id="border">
    <?php include 'sidebar.php';?>
    <div id="main">
        <div id="head_menu">
            <div id="title">
                FAWAY-YFPO持续改进平台 Alpha测试版本
            </div>
            <div class="head_menu_button" id="button_logout"><i class="fas fa-power-off"></i>
                <p>退出系统</p></div>
            <div class="head_menu_button" id="person_center"><i class="fas fa-user"></i>
                <p>个人中心</p></div>
        </div>
        <div id="main_content">
            <div id="content_tabs">
                <ul id="ul_tabs">
                    <li><a href="#welcome">欢迎首页</a></li>
                </ul>
                <div id="welcome">
                    <div class="content_border">
                        <p>欢迎使用持续改进平台</p>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
</body>
</html>

